home *** CD-ROM | disk | FTP | other *** search
/ .net 2002 March / DotNetMagazine-Issue107-Coverdisc-NET107-02-03-PCMac.bin / pc / PC Software / free_browsing / DavesQckSearchDbar3-14 / dqsd.exe / searches / walmart.xml < prev    next >
Text File  |  2002-09-27  |  4KB  |  134 lines

  1. <search function="walmart">
  2.   <name>Wal-Mart</name>
  3.   <category>Shopping</category>
  4.   <contributor>Glenn Carr</contributor>
  5.   <link>http://www.walmart.com/</link>
  6.   <email>glenn at glenncarr dot com</email>
  7.   <description>
  8.   Search Wal-Mart Online
  9.     <table class="helpboxDescTable">
  10.       <tr><td>[/all] - Entire Site (default)</td></tr>
  11.       <tr><td>/books</td></tr>
  12.       <tr><td>/electronics</td></tr>
  13.       <tr><td>/garden</td></tr>
  14.       <tr><td>/gifts</td></tr>
  15.       <tr><td>/hardware</td></tr>
  16.       <tr><td>/home</td></tr>
  17.       <tr><td>/jewelry</td></tr>
  18.       <tr><td>/movies</td></tr>
  19.       <tr><td>/music</td></tr>
  20.       <tr><td>/photo</td></tr>
  21.       <tr><td>/sporting</td></tr>
  22.       <tr><td>/toys</td></tr>
  23.       <tr><td>/videogames</td></tr>
  24.     </table>
  25.   <div class="helpboxDescLabels">Example:</div> 
  26.   <table class="helpboxDescTable">
  27.     <tr>
  28.       <td>walmart sanyo /electronics</td>
  29.     </tr>
  30.   </table>
  31.   </description>
  32.   <form name="walmartf"
  33.         method="get"
  34.         action="http://www.walmart.com/catalog/search-ng.gsp">
  35.     <input type="hidden" name="search_constraint" value="0" />
  36.     <input type="hidden" name="search_query" value="" />
  37.     <COMMENT>
  38.       The input element above, "search_constraint", was a SELECT element with the following options...
  39.       <select name="search_constraint">
  40.         <option value="0">Entire Site</option>
  41.         <option value="3944">Electronics</option>
  42.         <option value="5428">Garden & Hardware</option>
  43.         <option value="5426">Photo</option>
  44.         <option value="2636">Video Games</option>
  45.         <option value="4171">Toys</option>
  46.         <option value="2637">Gifts</option>
  47.         <option value="3891">Jewelry</option>
  48.         <option value="4044">Home</option>
  49.         <option value="4125">Sporting Goods</option>
  50.         <option value="4096">Movies</option>
  51.         <option value="3920">Books</option>
  52.         <option value="4104">Music</option>
  53.       </select>
  54.     </COMMENT>
  55.   </form>
  56.   <script><![CDATA[
  57.     function walmart(q)
  58.     {
  59.       if( nullArgs("walmart", q) )
  60.         return;
  61.  
  62.       var args = parseArgs(q, "all, books, electronics, garden, gifts, hardware, home, jewelry, movies, music, photo, sporting, toys, videogames");
  63.       if ( args.switches.length > 0 )
  64.       {
  65.         switch( args.switches[0].name )
  66.         {
  67.           case "electronics":
  68.               document.walmartf.search_constraint.value = "3944";
  69.               break;
  70.  
  71.           case "toys":
  72.               document.walmartf.search_constraint.value = "4171";
  73.               break;
  74.  
  75.           case "garden":
  76.           case "hardware":
  77.               document.walmartf.search_constraint.value = "5428";
  78.               break;
  79.  
  80.           case "photo":
  81.               document.walmartf.search_constraint.value = "5426";
  82.               break;
  83.               
  84.           case "videogames":
  85.               document.walmartf.search_constraint.value = "2636";
  86.               break;
  87.               
  88.           case "gifts":
  89.               document.walmartf.search_constraint.value = "2637";
  90.               break;
  91.               
  92.           case "jewelry":
  93.               document.walmartf.search_constraint.value = "3891";
  94.               break;
  95.               
  96.           case "home":
  97.               document.walmartf.search_constraint.value = "4044";
  98.               break;
  99.               
  100.           case "sporting":
  101.               document.walmartf.search_constraint.value = "4125";
  102.               break;
  103.               
  104.           case "movies":
  105.               document.walmartf.search_constraint.value = "4096";
  106.               break;
  107.               
  108.           case "books":
  109.               document.walmartf.search_constraint.value = "3920";
  110.               break;
  111.               
  112.           case "music":
  113.               document.walmartf.search_constraint.value = "4104";
  114.               break;
  115.               
  116.           case "all":
  117.           default:
  118.               break;
  119.  
  120.         }
  121.       }
  122.  
  123.       document.walmartf.search_query.value = args.q;
  124.  
  125.       submitForm(walmartf);
  126.     }
  127.   ]]></script>
  128.  
  129.   <copyright>
  130.     Copyright (c) 2002 David Bau
  131.     Distributed under the terms of the
  132.     GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  133.   </copyright>
  134. </search>